package com.peycard.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;

import java.sql.Timestamp;
import java.math.BigDecimal;


/**
 * The persistent class for the FINANCIAL_TRANSACTIONS database table.
 * 
 */
@Entity
@Table(name="FINANCIAL_TRANSACTIONS")
@NamedNativeQuery(name="findTransactionByDateNative_1", query="SELECT * FROM FINANCIAL_TRANSACTIONS WHERE TO_DATE(DATETIME_TX,MMDDHH24MISS) BETWEEN TO_DATE( ? ,MMDDHH24MISS) AND TO_DATE( ? ,MMDDHH24MISS)", resultClass = FinancialTransaction.class)
@NamedQueries({
@NamedQuery(name="findTransactionByPan_1", query="SELECT t FROM FinancialTransaction t WHERE t.pan like :pan_1"),
@NamedQuery(name="findTransatcionByStatus_1", query="SELECT t FROM FinancialTransaction t WHERE t.status like :status_1"),
@NamedQuery(name="findTransactionsByAmount_1", query="SELECT t FROM FinancialTransaction t WHERE t.amount like :amount_1"),
@NamedQuery(name="findTransactionsByAut_1", query="SELECT t FROM FinancialTransaction t WHERE t.autNr like :aut_1")
})
public class FinancialTransaction implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="ID_FINANCIALT_GENERATOR", sequenceName="ID_FINANCIALT_GENERATOR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ID_FINANCIALT_GENERATOR")
	@Column(name="ID_FINANCIAL_TRANSACTIONS")
	private long idFinancialTransactions;

	private BigDecimal amount;

	@Column(name="AUT_NR")
	private BigDecimal autNr;

	@Column(name="DATETIME_SERVER")
	private Timestamp datetimeServer;

	@Column(name="DATETIME_TX")
	private String datetimeTx;

	@Column(name="ID_SIGNATURE")
	private BigDecimal idSignature;

	private BigDecimal latitude;

	private BigDecimal longitude;

	@Column(name="MESSAGE_TYPE")
	private String messageType;

	@Column(name="NODE_NAME")
	private String nodeName;

	private String pan;

	@Column(name="RETRIEVAL_REFERENCE_NR")
	private BigDecimal retrievalReferenceNr;

	@Column(name="RSP_CODE")
	private BigDecimal rspCode;

	private String status;

    public FinancialTransaction() {
    }

	public long getIdFinancialTransactions() {
		return this.idFinancialTransactions;
	}

	public void setIdFinancialTransactions(long idFinancialTransactions) {
		this.idFinancialTransactions = idFinancialTransactions;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getAutNr() {
		return this.autNr;
	}

	public void setAutNr(BigDecimal autNr) {
		this.autNr = autNr;
	}

	public Timestamp getDatetimeServer() {
		return this.datetimeServer;
	}

	public void setDatetimeServer(Timestamp datetimeServer) {
		this.datetimeServer = datetimeServer;
	}

	public String getDatetimeTx() {
		return this.datetimeTx;
	}

	public void setDatetimeTx(String datetimeTx) {
		this.datetimeTx = datetimeTx;
	}

	public BigDecimal getIdSignature() {
		return this.idSignature;
	}

	public void setIdSignature(BigDecimal idSignature) {
		this.idSignature = idSignature;
	}

	public BigDecimal getLatitude() {
		return this.latitude;
	}

	public void setLatitude(BigDecimal latitude) {
		this.latitude = latitude;
	}

	public BigDecimal getLongitude() {
		return this.longitude;
	}

	public void setLongitude(BigDecimal longitude) {
		this.longitude = longitude;
	}

	public String getMessageType() {
		return this.messageType;
	}

	public void setMessageType(String messageType) {
		this.messageType = messageType;
	}

	public String getNodeName() {
		return this.nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getPan() {
		return this.pan;
	}

	public void setPan(String pan) {
		this.pan = pan;
	}

	public BigDecimal getRetrievalReferenceNr() {
		return this.retrievalReferenceNr;
	}

	public void setRetrievalReferenceNr(BigDecimal retrievalReferenceNr) {
		this.retrievalReferenceNr = retrievalReferenceNr;
	}

	public BigDecimal getRspCode() {
		return this.rspCode;
	}

	public void setRspCode(BigDecimal rspCode) {
		this.rspCode = rspCode;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}